package com.yjd.comm.news.service;

import java.util.List;

import com.yjd.comm.base.model.ResultModel;
import com.yjd.comm.base.service.IBaseService;
import com.yjd.comm.news.model.CategoryModel;
import com.yjd.comm.system.dto.OperParamDto;

/**
 * <b>description</b>：新闻类目业务接口<br>
 * <b>time</b>：2014-11-05 16:20:59 <br>
 * <b>author</b>：  percy-chen@hotmail.com
 */
public interface ICategoryService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public CategoryModel insert(CategoryModel model,OperParamDto dto) throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public ResultModel update(CategoryModel model,OperParamDto dto) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int delete(Long id,OperParamDto dto) throws Exception;
	
	/**
	 * 
	* 获取父节点下的所有直接子节点
	* @param parentId
	* @return
	* @throws Exception
	 */
	List<CategoryModel> listWebMenuByParents(Long parentId) throws Exception;

}
